# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-mac-alias
_pkgname=mac_alias
pkgver=2.2.2
pkgrel=4
pkgdesc='Generate or read binary Alias and Bookmark records from Python code.'
arch=('any')
url='https://pypi.org/project/mac_alias/2.2.2/#files'
license=('MIT')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/mac_alias-$pkgver.tar.gz")
sha512sums=('33fc6b3149c1d27e39adf285dfacc637abafe01b53eb8a5a2b9fba882bccd85e2799b2c05a581a2ae805f37de63e839d525cbcd7f78b8c0ada2bfc50f8c7efea')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

